<template>
	<page-body>
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center MyPortrayal_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub MyPortrayal_fd0_0'>
					<view class='flex flex-wrap align-center MyPortrayal_fd0_0_c0'>
						<text class='fu-iconfont2  MyPortrayal_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back"
							data-url="1">&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='MyPortrayal_fd0_0_c1_c0'>通知消息</text>
					</view>
					<view class='flex flex-wrap align-center justify-end MyPortrayal_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!-- web-view 不遮挡导航栏 -->

			<view class="page-content">
				<div class="item" v-for="(item, index) in list" :key="index" @click="goNext(item)">
					<div class="item-top">
						<image class="item-img" src="@/static/img02/gao3.png" mode=""></image>
						<view class="title hid1">{{item.title}}</view>
						<div class="time">{{item.create_time}}</div>
					</div>

					<div class="ite-content-outer">
						<div class="ite-content">
							{{item.synopsis }}
						</div>
					</div>

					<div class="ite-bottom">
						<div class="name">
							发布人：{{item.publisher }}
						</div>
						<div class="detail">
							查看详情<image class="detail-img" src="@/static/img02/right.png" mode=""></image>
						</div>
					</div>

					<div v-if="item.is_read == 0" class="dian"></div>
				</div>
				<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
						:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
			</view>

		</view>
	</page-body>
</template>

<script>
	import pagingList from '@/common/mixin/paging_list.js';
	export default {
		mixins: [pagingList],
		data() {
			return {
				list: [],
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
			};
		},
		onShow() {
			this.get_operationarticle()
		},
		methods: {
			// async get_operationarticle() {
			// 	let res = await this.$api.get(global.apiUrls.post6840057ea619d, {
			// 		type_id: 2
			// 	});

			// 	if (res.data.code != 1) {
			// 		this.$message.info(res.data.msg);
			// 		return
			// 	}

			// 	this.list = res.data.data.data
			// },
			get_operationarticle() {
				this.minixPagingListsApi = global.apiUrls.post6840057ea619d;
				this.pageingListApiMethod = 'get';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					type_id: 2
				}
				this.listData = [];
				this.list = this.listData;
				this.pagingListToggle();
			
			},
			pagingListPostData() {
			    return this.pagingListPostDataContent
			},
			goNext(val) {
				// 签到 2 抢答 3  随堂测5 投票4 数字人选人6 主题讨论7
				console.log('222222222222', val);
				//签到 授课中
				if (val.notice_type == '2' && val.teaching_status == '1') {
					uni.navigateTo({
						url:"/pages/kc/kcdetail/kcdetail?course="+val.course_id+'&msgid='+val.aid
					})
					// uni.navigateTo({
					// 	url: `/pages/course/instructioning/instructioning?teaching_id=${val.teaching_id}&lessonplanning_id=${val.lessonplanning_id}&time=${val.class_time}&sys_msg_id=${val.aid}`
					// })
					// 抢答 
				}else if (val.notice_type == '3' && val.quick_status == '1') {
					let end_time=''
					uni.navigateTo({
						url: `/pages/suitc/qd/qd?aid=${val.quick_id}&time=${val.create_time}&msgid=${val.aid}&time1=${end_time}`
					})
					// pages/suitc/qd/qd?aid=129&msgid=495&time=2025-10-02%2014%3A32&time1=2025-10-02%2014%3A33
				}else if (val.notice_type == '4' && val.vote_status == '1') {
					// uni.navigateTo({
					// 	url: `/pages/suitc/qd/qd?id2=${val.teaching_id}&id1=${val.lessonplanning_id}&msgid=${val.aid}`
					// })
					uni.navigateTo({
						url:'/pages/kc/kthd/kthd?course='+val.course_id
					})
				} else if (val.notice_type == '5' && val.exam_status == '1') {
					// 随堂测5
					uni.navigateTo({
						url:'/pages/kc/kthd/kthd?course='+val.course_id
					})
					// uni.navigateTo({
					// 	url: `/pages/suitc/qd/qd?id2=${val.teaching_id}&id1=${val.lessonplanning_id}&msgid=${val.aid}`
					// })
				}else if (val.notice_type == '6' && val.exam_status == '1') {
					// 数字人选人 6
					let end_time=''
					uni.navigateTo({
						url: "/pages/kc/xuanrenjg/xuanrenjg?teaching_id="+item.teaching_id+'&type=1&messid='+item.aid+'&time='+item.create_time+'&time1='+end_time+'&status='+item.status
					})
					// uni.navigateTo({
					// 	url:'/pages/kc/kthd/kthd?course='+val.course_id
					// })
					// uni.navigateTo({
					// 	url: `/pages/suitc/qd/qd?id2=${val.teaching_id}&id1=${val.lessonplanning_id}&msgid=${val.aid}`
					// })
				}else if (val.notice_type == '7' && val.discussion_status == '1') {
					// 主题讨论 7
					let end_time=''
					uni.navigateTo({
						url:'/pages/kc/kthd/kthd?course='+val.course_id
					})
					
				}else {
					uni.navigateTo({
						url: `/pages/My/newDetail/newDetail?aid=${val.aid}`
					})
				}


			}
		}
	}
</script>

<style lang="scss">
	.page-content {
		.item {
			margin: 24rpx;
			padding: 29rpx 24rpx;
			border-bottom: 1rpx solid #EEEEEE;
			position: relative;
			width: calc(100% - 48rpx);
			max-height: 323rpx;
			background: #FFFFFF;
			border-radius: 24rpx 24rpx 24rpx 24rpx;
			box-sizing: border-box;
			margin-bottom: 24rpx;

			.dian {
				width: 14rpx;
				height: 14rpx;
				background: #D32A29;
				border-radius: 50%;
				position: absolute;
				top: 25rpx;
				left: 58rpx;
			}

			.ite-bottom {
				margin-top: 28rpx;
				display: flex;
				font-weight: 400;
				font-size: 28rpx;
				color: #999999;
				justify-content: space-between;

				.detail-img {
					width: 10rpx;
					height: 18rpx;
					margin-left: 8rpx;
				}
			}

			.item-top {
				display: flex;
				height: 44rpx;
				align-items: center;

				.item-img {
					width: 44rpx;
					height: 44rpx;
					margin-right: 24rpx;
				}

				.title {
					font-weight: 500;
					font-size: 32rpx;
					color: #333333;
					line-height: 45rpx;
					max-width: 400rpx;
				}

				.time {
					font-weight: 400;
					font-size: 28rpx;
					color: #999999;
					line-height: 40rpx;
					float: right;
					position: absolute;
					right: 24rpx;
				}
			}

			.ite-content-outer {
				padding-bottom: 28rpx;
				border-bottom: 1rpx solid #EEEEEE;

				.ite-content {
					font-weight: 400;
					font-size: 32rpx;
					color: #333333;
					line-height: 48rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-line-clamp: 2;
					line-clamp: 2;
					-webkit-box-orient: vertical;
					margin-top: 31rpx;

				}
			}




		}
	}

	.page {
		// background: #FFFFFF;
		// height: 100vh;
		padding-bottom: 30rpx;
	}

	.clear {
		width: 44rpx;
		height: 44rpx;
		margin-left: 16rpx;
	}

	.MyPortrayal_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.MyPortrayal_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 700;
		color: #333333;
		line-height: 50rpx;
	}

	.MyPortrayal_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.MyPortrayal_fd0_0_c0 {
		width: 120rpx;
	}

	.MyPortrayal_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.MyPortrayal_flex_1 {
		padding: 24rpx;
	}

	.MyPortrayal_fd1_7_c1_c1_c0 {
		font-size: 24rpx;
		color: rgba(102, 102, 102, 1);
		font-weight: 400;
		line-height: 48rpx;
	}

	.MyPortrayal_fd1_7_c1_c1 {
		background: #f3f6f8;
		border-radius: 16rpx;
		background-size: 100% auto;
		padding: 24rpx;
	}

	.MyPortrayal_fd1_7_c1_c0_c2_c0 {
		font-size: 24rpx;
		color: #333;
		font-weight: 500;
		line-height: 33rpx;
	}

	.MyPortrayal_progress1_fd1_7_c1_c0_c1_c0 {
		background: rgba(20, 94, 253, 1);
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}

	.MyPortrayal_fd1_7_c1_c0_c1_c0 {
		border: 1px solid rgba(20, 94, 253, 0.1);
		background: rgba(20, 94, 253, 0.10);
		width: 300rpx;
		height: 20rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		background-size: 100% auto;
	}

	.MyPortrayal_fd1_7_c1_c0_c0_c1 {
		color: rgba(20, 94, 253, 1);
		font-size: 32rpx;
		font-weight: 700;
		line-height: 32rpx;
		text-decoration: none;
	}

	.MyPortrayal_fd1_7_c1_c0_c0_c0 {
		font-size: 48rpx;
		line-height: 56rpx;
		font-weight: 700;
		color: rgba(20, 94, 253, 1);
	}

	.MyPortrayal_fd1_7_c1_c0 {
		background: #f3f6f8;
		border-radius: 16rpx;
		background-size: 100% auto;
		padding: 24rpx;
		height: 286rpx;
	}

	.MyPortrayal_linefd1_7_c0 {
		background: #145efd;
		width: 50rpx;
		height: 8rpx;
		top: 80rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx;
	}
</style>